@using Orchard.ContentManagement
@{
    Script.Require("ULogin").AtHead();
    var funcId = Guid.NewGuid().ToString("N");
    var contentItem = (IContent) Model.ContentItem;
}
@using (Script.Head())
{
    
    @*<script src="//u-login.com/js/ulogin.js"></script> *@
    <script type="text/javascript">
    function uloginCallback_@(funcId)(token) {
        $.ajax({
            url: "/ulogin/login",
            type: "POST",
            data: { token: token, partId: @(contentItem.Id) }
        }).done(function (data) {
            location.reload();
        });
    }
</script>
}
<div class="ulogin-widget" id="uLogin-@(funcId)" data-ulogin="display=panel;fields=first_name,last_name;optional=sex,photo,email,phone,nickname,bdate,photo_big,city,country;providers=facebook,twitter,linkedin,vkontakte,googleplus,google,yandex;hidden=other;redirect_uri=;callback=uloginCallback_@(funcId)"></div> 
@if (WorkContext.CurrentUser != null)
{
     @Html.ActionLink(T("Sign Out").ToString(), "LogOff", new { Controller = "Account", Area = "Orchard.Users", ReturnUrl = Context.Request.RawUrl }, new { rel = "nofollow" })
}
<script>uLogin.customInit("uLogin-@funcId")</script>